package com.jzo2o.foundations.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import com.jzo2o.foundations.model.domain.Serve;
import com.jzo2o.foundations.model.domain.ServeSearch;
import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO;
import com.jzo2o.foundations.model.dto.response.ServeAggregationSimpleResDTO;
import com.jzo2o.foundations.model.dto.response.ServeAggregationTypeSimpleResDTO;
import com.jzo2o.foundations.model.dto.response.ServeCategoryResDTO;
import com.jzo2o.foundations.model.dto.response.ServeResDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-07-03
 */
public interface ServeMapper extends BaseMapper<Serve> {
    /**
     * 服务分页查询
     *
     * @param page
     * @param
     * @return
     */
    Page<ServeResDTO> page(Page<ServeResDTO> page,Long regionId );
    /**
     * 首页 服务查询
     *
     * @param
     * @param
     * @return
     */
    List<ServeCategoryResDTO> firstPageServeList(Long regionId);
    /**
     * 区域热门服务查询
     *
     * @param
     * @param
     * @return
     */
    List<ServeAggregationSimpleResDTO> hotServeList(Long regionId);
   /**
     * 区域服务类型列表
     * @param regionId 区域id
     * @return 区域服务类型列表
     */
    List<ServeAggregationTypeSimpleResDTO> serveTypeList(Long regionId);

    /**
     * 服务详情
     * @param id
     * @return
     */
    ServeAggregationSimpleResDTO getServeDetailById(Long id);

    /**
     * 查询所有服务
     *  在启用中
     * @return
     */
    List<ServeSearch> selectListAll();
   /**
     * 批量查询服务
     * @param list
     * @return
     */
    List<ServeSearch> SearchBatchIds(List<Long> list);

    /**
     * 获取服务详情
     *  订单使用
     * @param id
     * @return
     */
    ServeAggregationResDTO getServeForOrderById(Long id);
}
